﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Categorias.aspx.cs" Inherits="Bukstor.Admin.UI.Categorias" 
MasterPageFile="~/MasterAdmin.Master" Theme="SkinAdmin"%>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<title>Categorias</title>
</asp:Content>
<asp:Content ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:Panel ID="Panel1" runat="server" Width="600px" Style="margin-left: 187px" GroupingText="Ingrese el nombre de la nueva categoria:"><br />
    <div align="right" style="float: left; height: 26px; width: 228px;"><asp:Label ID="lblCategoria" runat="server" Text="Categoria"></asp:Label></div>
    <div style="float: right; height: 26px; width: 340px;"><asp:TextBox ID="txtCategoria" runat="server"></asp:TextBox><asp:RequiredFieldValidator
            ID="RequiredFieldValidator1" runat="server" ErrorMessage="RequiredFieldValidator" Text="* Ingrese una categoria"
            ValidationGroup="categorias" ControlToValidate="txtCategoria"></asp:RequiredFieldValidator></div>
        <br />   
    </asp:Panel><br />
    <div align="center"><asp:Button ID="btnAlta" runat="server" Text="CREAR CATEGORIA" OnClick="btnAlta_OnClick" ValidationGroup="categorias"/></div><br />
<div align="center"><asp:Button ID="btnTitulos" runat="server" Text="TITULOS" PostBackUrl="~/Titulos.aspx"/></div><br />

<div align="center"><asp:Button ID="btnSubcategorias" runat="server" Text="A SUBCATEGORIAS"  PostBackUrl="~/Subcategorias.aspx"/></div><br />
    
    <asp:GridView ID="GridView1" runat="server" DataSourceID="EntityDataSource1"  
        onselectedindexchanged="GridView1_SelectedIndexChanged" AllowPaging="True" 
        AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="id">
        <Columns>
            <asp:CommandField ShowEditButton="True" ButtonType="Image" 
                CancelImageUrl="~/Imagenes/icoCancel.jpeg" 
                EditImageUrl="~/Imagenes/icoEditar.gif" HeaderText="Editar" 
                SelectImageUrl="~/Imagenes/icoOk.jpeg" />
            <asp:BoundField DataField="id" HeaderText="id" ReadOnly="True" 
                SortExpression="id" />
            <asp:BoundField DataField="nombre" HeaderText="nombre" 
                SortExpression="nombre" />
        </Columns>
    </asp:GridView>
    <asp:EntityDataSource ID="EntityDataSource1" runat="server" 
            ConnectionString="name=BukstorBDEntities" 
            DefaultContainerName="BukstorBDEntities" EnableFlattening="False" 
            EntitySetName="Categorias" 
        EnableUpdate="True">
        </asp:EntityDataSource>
</asp:Content>


    
    
        
        
        
        
        
        
   
    
